package cn.ecnu.pojo.forum;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@AllArgsConstructor
@Data
@NoArgsConstructor
public class Comment {
    private Integer commentId; // 评论id
    private Integer typeId; // 评论内容的id, 和flag关联
    private Integer userId; // 评论者的id
    private String commentContent; // 评论内容

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date commentTime; // 评论时间
    private Integer likeCount; // 该评论的点赞数目
    private Integer flag; // 该评论的类型(0-post, 1-comment)
}
